package com.zsr.eduservice.client;

import com.zsr.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 视频模块微服务发现
 * @author zsr
 * @date 2021/6/16 21:20
 */
@FeignClient(name ="service-vod", fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {
    // @PathVariable注解一定要指定参数名称，否则出错
    //定义调用的方法路径
    @DeleteMapping(value = "/eduvod/video/{videoId}")
    R removeVideo(@PathVariable("videoId") String videoId);

    @DeleteMapping(value = "/eduvod/video/delete-batch")
    R removeVideoList(@RequestParam("videoIdList") List<String> videoIdList);
}
